package com.wn.controller;

import com.wn.entity.ResponseEntity;
import com.wn.entity.User;
import com.wn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;
    @PostMapping("crud")
    public ResponseEntity addOne(@RequestBody User user){
        return userService.addOne(user);
    }
    @PostMapping("login")
    public ResponseEntity login(@RequestBody User user){
        return userService.login(user);
    }

}
